home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16265 < prev    next >
Encoding:
Text File  |  1996-08-05  |  712 b   |  28 lines

  1. Path: moon.yzit.edu.tw!ccthkr
  2. From: ccthkr@moon.yzit.edu.tw (Thinker Li)
  3. Newsgroups: comp.lang.c++
  4. Subject: G++ : nest declare class
  5. Date: 10 Apr 1996 04:25:01 GMT
  6. Organization: Dept. Comp. Sci. & Info. Eng., Chiao-Tung Univ., Taiwan
  7. Message-ID: <4kfd6t$ish@news.csie.nctu.edu.tw>
  8. NNTP-Posting-Host: ccthkr%@moon.yzit.edu.tw
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. When I declare a class in another clas like
  12. template <class T>
  13. class a {
  14.     class b {
  15.     public:
  16.         b *h();
  17.     };
  18. };
  19. In GNU C++ ....
  20. I think that I can define method h() of "class b" 
  21. outside "class a" just like :
  22.  
  23. template <class T> 
  24. a<T>::b *a<T>::b::h() { ... }
  25.  
  26. but G++ 2.7.2 give me a error message.....
  27. Is it wrong of me?? or it is wrong of G++ ??? 
  28.